//
//  TopicTableViewCell.m
//  AStage_shougongke
//
//  Created by 赵磊 on 16/1/21.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "TopicTableViewCell.h"

@implementation TopicTableViewCell
- (void)dealloc
{
    [_imgView release];
    [_title release];
    [super dealloc];
}
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.imgView = [[UIImageView alloc] init];
        _imgView.layer.cornerRadius = 4;
        _imgView.clipsToBounds = YES;
        [self.contentView addSubview:_imgView];
        self.title = [[UILabel alloc] init];
        _title.textColor = [UIColor whiteColor];
        [_imgView addSubview:_title];
    }
    return self;
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    _imgView.frame = CGRectMake(10, 0, self.contentView.frame.size.width - 20, (self.contentView.frame.size.width - 20) / 2);
    _title.frame = CGRectMake(10, (self.contentView.frame.size.width - 20) / 2 - 40, self.contentView.frame.size.width - 30, 40);
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
